package com.organize.repositories.query;

import com.autumn.domain.repositories.DefaultEntityRepository;
import com.autumn.mybatis.mapper.annotation.MapperViewSelect;
import com.organize.entities.query.EmployeeQuery;
import org.springframework.stereotype.Repository;

/**
 * 员工查询仓储
 * <p>
 * </p>
 *
 * @description TODO
 * @author: 老码农
 * @create: 2020-10-17 14:48
 **/
@Repository
@MapperViewSelect("SELECT a.*," +
        "b.name as department_name,b.full_id as department_full_id,b.full_name as department_full_name," +
        "c.name as post_name," +
        "d.name as education_name " +
        "FROM org_employee as a " +
        "INNER JOIN org_department as b on a.department_id = b.id " +
        "INNER JOIN common_data_dictionary as c on a.post_id = c.id " +
        "INNER JOIN common_data_dictionary as d on a.education_id = d.id")
public interface EmployeeQueryRepository extends DefaultEntityRepository<EmployeeQuery> {

}
